<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>后台管理系统</title>
    <link rel="icon" href="favicon.ico" type="image/ico">
    <meta name="keywords" content="后台模板,后台管理系统">
    <meta name="description" content="一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/materialdesignicons.min.css" rel="stylesheet">
    <link href="css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <div th:insert="~{commons/commons::sidebar(active='employees.html')}"></div>
        <!--End 左侧导航-->

        <!--头部信息-->
        <div th:insert="~{commons/commons::topbar(title='编辑员工信息')}"></div>
        <!--End 头部信息-->

        <!--页面主要内容-->
        <main class="lyear-layout-content">

            <div class="container-fluid">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">
                                <form class="form-horizontal" th:action="@{/editEmployee}" method="post">
                                    <p style="color:red" th:text="${msg}"  th:if="${not #strings.isEmpty(msg)}"></p>
                                    <input type="hidden" name="id" th:value="${employee.getId()}">
                                    <div class="form-group">
                                        <label class="col-md-3 control-label" for="name">员工名称</label>
                                        <div class="col-md-7">
                                            <input class="form-control" type="text" id="name" name="name" th:value="${employee.getName()}" placeholder="请输入员工名称">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label" for="role">角色</label>
                                        <div class="col-md-7">
                                            <input class="form-control" type="text" id="role" name="role" th:value="${employee.getRole()}" placeholder="请输入员工角色">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label" >性别</label>
                                        <div class="col-md-7">
                                          <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" name="sex" th:checked="${employee.getSex()=='1' ? true:false}" th:value="1"><span>男</span>
                                          </label>
                                          <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" name="sex" th:checked="${employee.getSex()=='2' ? true:false }" th:value="2"><span>女</span>
                                          </label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label" for="birthday">出生日期</label>
                                        <div class="col-md-7">
                                            <input class="form-control" type="text" id="birthday" name="birthday" th:value="${employee.getBirthday()}"    placeholder="请输入出生日期">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label" for="age">年龄</label>
                                        <div class="col-md-7">
                                            <input class="form-control" type="text" id="age" name="age" th:value="${employee.getAge()}" placeholder="请输入年龄">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-9 col-md-offset-3">
                                            <a class="btn btn-warning" th:href="@{employees}">返回</a>
                                            <button class="btn btn-primary" type="submit">编辑</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>
</body>
</html>